home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-12 | 3.4 KB | 133 lines | [TEXT/PJMM] |
- unit Menus;
-
- { Pascal Interface to the Macintosh Libraries }
-
- { Copyright © Apple Computer Inc. }
- { All Rights Reserved }
-
- { Adapted for use with THINK Pascal 4.0.x by Marco Piovanelli }
-
- interface
- uses
- Types;
-
- type
-
- MenuRef = MenuHandle;
-
- MenuDefProcPtr = ProcPtr; { PROCEDURE MenuDef(message: INTEGER; theMenu: MenuRef; VAR menuRect: Rect; hitPt: Point; VAR whichItem: INTEGER); }
- MenuBarDefProcPtr = ProcPtr; { FUNCTION MenuBarDef(selector: INTEGER; message: INTEGER; parameter1: INTEGER; parameter2: LONGINT): LONGINT; }
- MenuHookProcPtr = ProcPtr; { PROCEDURE MenuHook; }
- MBarHookProcPtr = ProcPtr; { FUNCTION MBarHook(VAR menuRect: Rect): INTEGER; }
- MenuDefUPP = UniversalProcPtr;
- MenuBarDefUPP = UniversalProcPtr;
- MenuHookUPP = UniversalProcPtr;
- MBarHookUPP = UniversalProcPtr;
-
- const
- uppMenuDefProcInfo = $0000FF80; { PROCEDURE (2 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param); }
- uppMenuBarDefProcInfo = $00003AB0; { FUNCTION (2 byte param, 2 byte param, 2 byte param, 4 byte param): 4 byte result; }
- uppMenuHookProcInfo = $00000000; { PROCEDURE ; }
- uppMBarHookProcInfo = $000000CF; { SPECIAL_CASE_PROCINFO( kSpecialCaseMBarHook ) }
-
- function NewMenuDefProc (userRoutine: MenuDefProcPtr): MenuDefUPP;
- inline
- $2E9F;
-
- function NewMenuBarDefProc (userRoutine: MenuBarDefProcPtr): MenuBarDefUPP;
- inline
- $2E9F;
-
- function NewMenuHookProc (userRoutine: MenuHookProcPtr): MenuHookUPP;
- inline
- $2E9F;
-
- function NewMBarHookProc (userRoutine: MBarHookProcPtr): MBarHookUPP;
- inline
- $2E9F;
-
- procedure CallMenuDefProc (message: INTEGER;
- theMenu: MenuRef;
- var menuRect: Rect;
- hitPt: Point;
- var whichItem: INTEGER;
- userRoutine: MenuDefUPP);
- inline
- $205F, $4E90;
-
- function CallMenuBarDefProc (selector: INTEGER;
- message: INTEGER;
- parameter1: INTEGER;
- parameter2: LONGINT;
- userRoutine: MenuBarDefUPP): LONGINT;
- inline
- $205F, $4E90;
-
- procedure CallMenuHookProc (userRoutine: MenuHookUPP);
- inline
- $205F, $4E90;
-
- function CallMBarHookProc (var menuRect: Rect;
- userRoutine: MBarHookUPP): INTEGER;
- {To be implemented: Glue to move parameters according to special case conventions.}
-
- function GetMBarHeight: INTEGER;
- inline
- $3EB8, $0BAA; { move.w MBarHeight, (sp) }
-
- procedure AppendResMenu (theMenu: MenuRef;
- theType: ResType);
- inline
- $A94D;
-
- procedure InsertMenuItem (theMenu: MenuRef;
- itemString: ConstStr255Param;
- afterItem: INTEGER);
- inline
- $A826;
-
- procedure DeleteMenuItem (theMenu: MenuRef;
- item: INTEGER);
- inline
- $A952;
-
- procedure SetMenuItemText (theMenu: MenuRef;
- item: INTEGER;
- itemString: ConstStr255Param);
- inline
- $A947;
-
- procedure GetMenuItemText (theMenu: MenuRef;
- item: INTEGER;
- var itemString: Str255);
- inline
- $A946;
-
- function GetMenuHandle (menuID: INTEGER): MenuRef;
- inline
- $A949;
-
- procedure DeleteMCEntries (menuID: INTEGER;
- menuItem: INTEGER);
- inline
- $AA60;
-
- procedure DisposeMCInfo (menuCTbl: MCTableHandle);
- inline
- $AA63;
-
- procedure InsertFontResMenu (theMenu: MenuRef;
- afterItem: INTEGER;
- scriptFilter: INTEGER);
- inline
- $303C, $0400, $A825;
-
- procedure InsertIntlResMenu (theMenu: MenuRef;
- theType: ResType;
- afterItem: INTEGER;
- scriptFilter: INTEGER);
- inline
- $303C, $0601, $A825;
-
- implementation
- end.